count=0
def hanoi(n,a,b,c):
    global count
    if n==1:
        print("{}:{}->{}".format(1,a,c))
        count+=1
    else:
        hanoi(n-1,a,c,b)
        print("{}:{}->{}".format(n,a,c))
        count+=1
        hanoi(n-1,b,a,c)















        
